package com.springboot.Controller;

import com.alibaba.fastjson.JSONObject;
import org.springframework.web.bind.annotation.*;

/**
 * @author 权哥
 * @version 1.0
 * @date 2022/5/10 16:11
 */
@RestController
public class RegisterController {
    String user=null;
    String password=null;
    String tel=null;

    @RequestMapping(value = "/Register",method = RequestMethod.POST)
    public void Register(@RequestBody JSONObject jsonObject)
    {
        user=jsonObject.getString("user");
        password=jsonObject.getString("password");
        tel= jsonObject.getString("tel");
        System.out.println("用户名："+user+"，密码："+password+", 电话号码:"+tel);
    }

    @RequestMapping(value = "/ForgetPassword",method = RequestMethod.POST)
    public void ForgetPassword(@RequestBody JSONObject jsonObject)
    {
        password=jsonObject.getString("password");
        tel= jsonObject.getString("tel");
        System.out.println("密码："+password+", 电话号码:"+tel);
    }


}
